package com.rr.event.listener;

import com.rr.entity.AddAction;
import com.rr.entity.UpdateAction;
import com.rr.event.BaseEvent;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class ActionListener {
    @EventListener
    public void addAction(BaseEvent<AddAction> action) {
        log.info("执行添加操作");
    }

    @EventListener
    public void updateAction(BaseEvent<UpdateAction> action){
        log.info("执行更新操作");
    }
}
